package com.situ.shoplook.common.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.situ.shoplook.common.util.Xin;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 功能：
 *
 * @author 千堆雪
 * @version 1.0.0
 * <p>
 * created by 千堆雪 on 2024/8/24, last modified by 千堆雪 on 2024/8/24
 */
@Xin.Meta(table = "t_product_spu", where = "id")
@Getter
@Setter
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@ToString
public class ProductSpu implements Serializable {
    @EqualsAndHashCode.Include
    private Integer id;//主键
    private String name;//商品名称
    private String alias;//别名
    private String summary;//摘要
    private String pic;//主图
    private List<String> otherPics;//其余图片
    private String detail;//商品详情
    private String description;//备注

    private Integer categoryId;//类别编号
    private Integer brandId;//品牌编号

    private String createdBy;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;
    private String updatedBy;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedTime;

    @Xin.Meta(where = "false")
    private Category category;//所属类别
    @Xin.Meta(where = "false")
    private Brand brand;//所属品牌
}
